home *** CD-ROM | disk | FTP | other *** search
- onClipEvent(enterFrame){
- if(_name != "shipD")
- {
- _Y = _Y + yspeed;
- _X = _X + xspeed;
- xspeed *= 0.97;
- if(_X < -100 || _X > 650 || _Y < -100 || _Y > 500 || _root.rem == true)
- {
- removeMovieClip(this);
- }
- var i = 0;
- while(i <= 20)
- {
- if(sh.harea.hitTest(_root["hmn" + i]))
- {
- life -= _root["hmn" + i].dmg;
- sh.play();
- removeMovieClip(_root["hmn" + i]);
- }
- i++;
- }
- if(_root.ship.sh.hitTest(sh.harea))
- {
- play();
- _root.ship.play();
- }
- if(life <= 0)
- {
- play();
- }
- yy = random(30);
- if(yy == 0)
- {
- xspeed = (Math.random() - 0.5) * 20;
- }
- }
- }
-